package com.jinxin.platform.cdacscontrolmgr.task;

import com.jinxin.platform.cdacscontrolmgr.mapper.CdacscontrolmgrRegistInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Description: bccah
 * Created by 34759 on 2019/8/16 15:57
 */
@EnableScheduling
@Configuration
@Component
public class AcsControlMgrTask {

    @Autowired
    private CdacscontrolmgrRegistInfoMapper registInfoMapper;

    /**
     * 每10分钟更新，访客记录中待来访到了变成未到访状态
     */
    @Scheduled(cron = "0 0/10 * * * ?  ")
    public void updateVisitStatus(){
        registInfoMapper.updateVisitStatus();
    }

}
